{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5852d813",
   "metadata": {},
   "source": [
    "作业要求以学号命名，类似\"123456.ipynb\"，不需要加姓名。\n",
    "\n",
    "\n",
    "作业提交的方式见下面链接：\n",
    "https://blog.csdn.net/sheagu/article/details/122397816"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5d3dca5a",
   "metadata": {},
   "source": [
    "## 题目一\n",
    "\n",
    "有一个这样的DNA核酸序列\n",
    "\n",
    "“AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC”\n",
    "\n",
    "请把这个核酸序列存入一个list，并数一数A、G、C、T各有多少个。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "e6521351",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The num of A is: 20\n",
      "The num of G is: 17\n",
      "The num of C is: 12\n",
      "The num of T is: 21\n"
     ]
    }
   ],
   "source": [
    "# 你的代码\n",
    "list1=list('AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC')\n",
    "\n",
    "num_A=list1.count('A')\n",
    "num_G=list1.count('G')\n",
    "num_C=list1.count('C')\n",
    "num_T=list1.count('T')\n",
    "\n",
    "print('The num of A is: '+str(num_A))\n",
    "print('The num of G is: '+str(num_G))\n",
    "print('The num of C is: '+str(num_C))\n",
    "print('The num of T is: '+str(num_T))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "daf8500d",
   "metadata": {},
   "source": [
    "## 题目二\n",
    "\n",
    "一个花样滑冰运动员表演后，裁判给表演内容进行评分，分数从0.25分到10分，每次增加值为0.25分。\n",
    "\n",
    "试生成一个元组，把可能的得分存入元组，并遍历元组的每一项，打印“一个运动员可能得_____分”。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "90604ebb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "一个运动员可能得0.25分\n",
      "一个运动员可能得0.5分\n",
      "一个运动员可能得0.75分\n",
      "一个运动员可能得1.0分\n",
      "一个运动员可能得1.25分\n",
      "一个运动员可能得1.5分\n",
      "一个运动员可能得1.75分\n",
      "一个运动员可能得2.0分\n",
      "一个运动员可能得2.25分\n",
      "一个运动员可能得2.5分\n",
      "一个运动员可能得2.75分\n",
      "一个运动员可能得3.0分\n",
      "一个运动员可能得3.25分\n",
      "一个运动员可能得3.5分\n",
      "一个运动员可能得3.75分\n",
      "一个运动员可能得4.0分\n",
      "一个运动员可能得4.25分\n",
      "一个运动员可能得4.5分\n",
      "一个运动员可能得4.75分\n",
      "一个运动员可能得5.0分\n",
      "一个运动员可能得5.25分\n",
      "一个运动员可能得5.5分\n",
      "一个运动员可能得5.75分\n",
      "一个运动员可能得6.0分\n",
      "一个运动员可能得6.25分\n",
      "一个运动员可能得6.5分\n",
      "一个运动员可能得6.75分\n",
      "一个运动员可能得7.0分\n",
      "一个运动员可能得7.25分\n",
      "一个运动员可能得7.5分\n",
      "一个运动员可能得7.75分\n",
      "一个运动员可能得8.0分\n",
      "一个运动员可能得8.25分\n",
      "一个运动员可能得8.5分\n",
      "一个运动员可能得8.75分\n",
      "一个运动员可能得9.0分\n",
      "一个运动员可能得9.25分\n",
      "一个运动员可能得9.5分\n",
      "一个运动员可能得9.75分\n"
     ]
    }
   ],
   "source": [
    "# 你的代码\n",
    "import numpy as np\n",
    "\n",
    "scores=tuple(np.arange(0.25,10,0.25))\n",
    "for score in scores:\n",
    "    print('一个运动员可能得'+str(score)+'分')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0c3a4e99",
   "metadata": {},
   "source": [
    "## 题目三\n",
    "\n",
    "创建一个字典，列出你所了解的地域美食，比如{'肠粉':{'城市':'广州','原料':'米'}}。当然，你可以做的更丰富一些。\n",
    "最后遍历你熟悉的美食，打印出，类似如下的句子：“肠粉是广州的一种美食，它的主要原料是米”。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "b0026af6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "肠粉是广州的一种美食，它的主要原料是米\n",
      "螺蛳粉是广西的一种美食，它的主要原料是米\n"
     ]
    }
   ],
   "source": [
    "# 你的代码\n",
    "list2={'肠粉':{'城市':'广州','原料':'米'},'螺蛳粉':{'城市':'广西','原料':'米'}}\n",
    "\n",
    "for name in list2:\n",
    "    print(name+'是'+list2[name]['城市']+'的一种美食，它的主要原料是'+list2[name]['原料'])\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
